package cn.pku.sirx.snad.uias.analyzer.interactionship;

import java.util.Date;

import org.springframework.util.Assert;

import cn.pku.sirx.snad.uias.dao.IMessageInfluenceDao;

/**
 * @author WangXiao
 */
public class MessageBoardAnalyzer implements IInteractionshipAnalyzer {

	@Override
	public double analyze(String fromUserId, String toUserId) {
		Assert.notNull(fromUserId);
		Assert.notNull(toUserId);

		// here we ignore the time influence
		return messageInfluenceDao.getInfluence(fromUserId, toUserId, null,
				new Date());
	}

	private IMessageInfluenceDao messageInfluenceDao;

	public void setMessageInfluenceDao(IMessageInfluenceDao messageInfluenceDao) {
		this.messageInfluenceDao = messageInfluenceDao;
	}

}
